EPD Extension Kit for MSP430 LaunchPad
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
EPD_hardware_driver.c File Reference

The initialization and configuration of COG hardware driver. More...

#include <math.h>
#include "EPD_hardware_driver.h"

Functions

void start_EPD_timer (void)
 Start Timer.
 
void stop_EPD_timer (void)
 Stop Timer.
 
uint32_t get_current_time_tick (void)
 Get current Timer after starting a new one.
 
void SysTick_Handler (void)
 Interrupt Service Routine for system tick counter.
 
__interrupt void Timer_A0 (void)
 Interrupt Service Routine for Timer A0.
 
void delay_ms (unsigned int ms)
 Delay mini-seconds. More...
 
void sys_delay_ms (unsigned int ms)
 Delay mini-seconds. More...
 
void PWM_start_toggle (void)
 The PWM signal starts toggling.
 
void PWM_stop_toggle (void)
 The PWM signal stops toggling.
 
void PWM_run (uint16_t ms)
 PWM toggling. More...
 
void spi_init (void)
 Configure SPI.
 
void spi_attach (void)
 Initialize SPI.
 
void spi_detach (void)
 Disable SPI and change to GPIO.
 
void SPI_write (unsigned char Data)
 SPI synchronous write.
 
uint8_t SPI_read (unsigned char RDATA)
 SPI synchronous read.
 
uint8_t SPI_write_ex (unsigned char Data)
 Send data to SPI with time out feature. More...
 
void SPI_send (unsigned char register_index, unsigned char *register_data, unsigned length)
 SPI command if register data is larger than two bytes. More...
 
void SPI_send_byte (uint8_t register_index, uint8_t register_data)
 SPI command. More...
 
__interrupt void ADC10_ISR (void)
 
int16_t get_temperature (void)
 Get temperature value from ADC. More...
 
void initialize_temperature (void)
 Initialize the temperature sensor.
 
void EPD_display_hardware_init (void)
 Initialize the EPD hardware setting.
 

Detailed Description

The initialization and configuration of COG hardware driver.

Copyright (c) 2012-2013 Pervasive Displays Inc. All rights reserved.

Authors: Pervasive Displays Inc.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Function Documentation

void delay_ms ( unsigned int  ms)

Delay mini-seconds.

Parameters
msThe number of mini-seconds
int16_t get_temperature ( void  )

Get temperature value from ADC.

Returns
the Celsius temperature
void PWM_run ( uint16_t  ms)

PWM toggling.

Parameters
msThe interval of PWM toggling (mini seconds)
void SPI_send ( unsigned char  register_index,
unsigned char *  register_data,
unsigned  length 
)

SPI command if register data is larger than two bytes.

Parameters
register_indexThe Register Index as SPI command to COG
register_dataThe Register Data for sending command data to COG
lengthThe number of bytes of Register Data which depends on which Register Index is selected.
void SPI_send_byte ( uint8_t  register_index,
uint8_t  register_data 
)

SPI command.

Parameters
register_indexThe Register Index as SPI command to COG
register_dataThe Register Data for sending command data to COG
uint8_t SPI_write_ex ( unsigned char  Data)

Send data to SPI with time out feature.

Parameters
dataThe data to be sent out
void sys_delay_ms ( unsigned int  ms)

Delay mini-seconds.

Parameters
msThe number of mini-seconds